package br.ocsot.game;

import br.ocsot.game.element.actor.Player;
import br.ocsot.game.input.keyboard.KeyboardListner;
import br.ocsot.game.input.mouse.MouseListner;

/**
 * Classe responsavel pelo setup inicial do jogo e controle de fluxo das threads.
 * 
 * @author direx
 *
 */
public class Game {
	
	private GameFrame frame;
	
	private KeyboardListner keybord;
	
	private MouseListner mouse;
	
	private Player player;
	
	private GameStatus status;
	
	public Game() {
                                 
		this.keybord = new KeyboardListner();
		this.mouse   = new MouseListner();
		
		this.frame = new GameFrame("Game", 800, 600);
		this.frame.addKeyListener(keybord);
		this.frame.addMouseListener(mouse);
		this.frame.addMouseMotionListener(mouse);
		
		this.status = GameStatus.RUNNING;
		this.player = new Player();
	}
	
	public void run() {
		while (this.status != GameStatus.EXIT) {
			this.eventHandler();
			this.update();
			this.draw();
		}
	}
	
	public void eventHandler() {
		
	}
	
	public void update() {
		
	}
	
	public void draw() {
		
	}
	
}

